/*
 * @Author: 江舟 jijiangzhou@recycloud.cn
 * @Date: 2024-05-16 14:54:08
 * @LastEditors: 江舟 jijiangzhou@recycloud.cn
 * @LastEditTime: 2024-05-16 14:54:36
 * @FilePath: \vite-project\src\hooks\usePerm.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import useUserStore from '@/store/user';

const usePerm = () => {
	const { actionPerms } = useUserStore();

	const hasPermission = (permission: string) => {
		return actionPerms.includes(permission);
	};

	return {
		hasPermission,
	};
};

export default usePerm;
